theme: Use -gtk-icon-filter for full-color icons
authornana-4 <hnmaigo@gmail.com>
Sat, 30 May 2020 21:37:06 +0000 (06:37 +0900)
committernana-4 <hnmaigo@gmail.com>
Thu, 15 Apr 2021 09:39:08 +0000 (18:39 +0900)
Not for symbolic icons.

Don't apply `-gtk-icon-filter: opacity(0.5);` to the symbolic icons as
they already have the "gray" colors indicating the disabled state.
Symbolic icons can be styled using the `color` property.

Also remove the obsolete comment.

gtk/theme/Default/_common.scss

index 9b44517af535af23d71989152066d6ba6d87254b..83692f5e9747301aa8b130699f43d5fa093ec948 100644 (file)
@@ -39,19 +39,9 @@ dnd {
   -gtk-icon-size: 32px;
 }
 
-/*
-   These wildcard seems unavoidable, need to investigate.
-   Wildcards are bad and troublesome, use them with care,
-   or better, just don't.
-   Every time a wildcard is used a kitten dies, painfully.
-*/
-
-spinner:disabled,
-arrow:disabled,
-scrollbar:disabled,
-check:disabled,
-radio:disabled,
-treeview.expander:disabled { -gtk-icon-filter: opacity(0.5); }
+image:disabled {
+  -gtk-icon-filter: opacity(0.5);
+}
 
 .view,
 %view {
@@ -509,7 +499,8 @@ button {
         @include button(backdrop);
 
         transition: $backdrop_transition;
-        -gtk-icon-filter: none;
+
+        &:not(:disabled) { -gtk-icon-filter: none; }
 
         &:active,
         &:checked { @include button(backdrop-active); }
@@ -525,6 +516,7 @@ button {
 
     &:disabled {
       @include button(insensitive);
+      -gtk-icon-filter: opacity(0.5);
 
       &:active,
       &:checked { @include button(insensitive-active); }